﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Kortex.LedBulb
{
    public partial class GlobalLedPanel : UserControl
    {
        public GlobalLedPanel()
        {
            InitializeComponent();

            Init_toolTip();
        }

        private void Init_toolTip()
        {

            
            TransctionTip.SetToolTip(TransctionLed, "Transction Viewer");
            
            ReCorderTip.SetToolTip(RecoderedLED, "Recorder");
            
        }

        public void StartBlink(int milisecond,int which)
        {
            switch(which)
            {

                case 1:
                    TransctionLed.Blink(milisecond);
                    break;
                case 2:
                    RecoderedLED.Blink(milisecond);
                    break;
               

            }
        }


        public void SetToolTipTitle(string tiptile, int which)
        {

            switch (which)
            {

                case 1:
                    TransctionTip.ToolTipTitle = tiptile;
                    break;
                case 2:
                    ReCorderTip.ToolTipTitle = tiptile;
                    break;
               

            }
        }


        public void SetColor(Color col, int which)
        {
            switch (which)
            {

                case 1:
                    TransctionLed.Color = col;
                    break;
                case 2:
                    RecoderedLED.Color = col;
                    break;
            }
        }


       public void StopBlink(int which)
        {
            switch(which)
            {

                case 1:
                    TransctionLed.Blink(0);
                    break;
                case 2:
                    RecoderedLED.Blink(0);
                    break;
            }
        }

         private void RecoderedLED_Click(object sender, EventArgs e)
         {

         }

         private void TransctionLed_Click(object sender, EventArgs e)
         {

         }
    }
}
